﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace HYRevitCode.ShortPathSuite
{
	public class Vertex
	{
		public Vertex(long id, XYZ pt)
		{
			this.id = id;
			this.point = pt;
			this.weight = double.MaxValue;
			this.visited = false;
			this.edgeList = new List<long>();
		}

		public long ID
		{
			get
			{
				return this.id;
			}
		}

		public XYZ Point
		{
			get
			{
				return this.point;
			}
		}

		public double Weight
		{
			get
			{
				return this.weight;
			}
			set
			{
				this.weight = value;
			}
		}

		public bool Visited
		{
			get
			{
				return this.visited;
			}
			set
			{
				this.visited = value;
			}
		}

		public List<long> EdgeList
		{
			get
			{
				return this.edgeList;
			}
		}

		public override bool Equals(object obj)
		{
			Vertex vertex = obj as Vertex;
			return vertex != null && this.id == vertex.ID;
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		private long id;

		private XYZ point;

		private double weight;

		private bool visited;

		private List<long> edgeList;
	}
}
